<?php

/**
 * This is the model class for table "d_kpjm".
 *
 * The followings are the available columns in table 'd_kpjm':
 * @property integer $ID
 * @property string $THANG
 * @property string $KDJENDOK
 * @property string $KDSATKER
 * @property string $KDDEPT
 * @property string $KDUNIT
 * @property string $KDPROGRAM
 * @property string $KDGIAT
 * @property string $KDOUTPUT
 * @property string $KDLOKASI
 * @property string $KDKABKOTA
 * @property string $KDDEKON
 * @property string $KDSOUTPUT
 * @property string $KDKMPNEN
 * @property string $KDSDANA
 * @property string $RPHMIN1_51
 * @property string $RPHPLS1_51
 * @property string $RPHPLS2_51
 * @property string $RPHPLS3_51
 * @property string $RPHMIN1_52
 * @property string $RPHPLS1_52
 * @property string $RPHPLS2_52
 * @property string $RPHPLS3_52
 * @property string $RPHMIN1_53
 * @property string $RPHPLS1_53
 * @property string $RPHPLS2_53
 * @property string $RPHPLS3_53
 * @property string $RPHMIN1_54
 * @property string $RPHPLS1_54
 * @property string $RPHPLS2_54
 * @property string $RPHPLS3_54
 * @property string $RPHMIN1_55
 * @property string $RPHPLS1_55
 * @property string $RPHPLS2_55
 * @property string $RPHPLS3_55
 * @property string $RPHMIN1_56
 * @property string $RPHPLS1_56
 * @property string $RPHPLS2_56
 * @property string $RPHPLS3_56
 * @property string $RPHMIN1_57
 * @property string $RPHPLS1_57
 * @property string $RPHPLS2_57
 * @property string $RPHPLS3_57
 * @property string $RPHMIN1_58
 * @property string $RPHPLS1_58
 * @property string $RPHPLS2_58
 * @property string $RPHPLS3_58
 * @property string $VOLMIN1
 * @property string $VOLPLS1
 * @property string $VOLPLS2
 * @property string $KDLEVEL
 * @property string $VOLPLS3
 */
class DKpjm extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return DKpjm the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'd_kpjm';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('THANG, KDGIAT', 'length', 'max'=>4),
			array('KDJENDOK, KDUNIT, KDPROGRAM, KDLOKASI, KDKABKOTA, KDSDANA', 'length', 'max'=>2),
			array('KDSATKER', 'length', 'max'=>6),
			array('KDDEPT, KDOUTPUT, KDSOUTPUT, KDKMPNEN', 'length', 'max'=>3),
			array('KDDEKON, KDLEVEL', 'length', 'max'=>1),
			array('RPHMIN1_51, RPHPLS1_51, RPHPLS2_51, RPHPLS3_51, RPHMIN1_52, RPHPLS1_52, RPHPLS2_52, RPHPLS3_52, RPHMIN1_53, RPHPLS1_53, RPHPLS2_53, RPHPLS3_53, RPHMIN1_54, RPHPLS1_54, RPHPLS2_54, RPHPLS3_54, RPHMIN1_55, RPHPLS1_55, RPHPLS2_55, RPHPLS3_55, RPHMIN1_56, RPHPLS1_56, RPHPLS2_56, RPHPLS3_56, RPHMIN1_57, RPHPLS1_57, RPHPLS2_57, RPHPLS3_57, RPHMIN1_58, RPHPLS1_58, RPHPLS2_58, RPHPLS3_58, VOLMIN1, VOLPLS1, VOLPLS2, VOLPLS3', 'length', 'max'=>19),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('ID, THANG, KDJENDOK, KDSATKER, KDDEPT, KDUNIT, KDPROGRAM, KDGIAT, KDOUTPUT, KDLOKASI, KDKABKOTA, KDDEKON, KDSOUTPUT, KDKMPNEN, KDSDANA, RPHMIN1_51, RPHPLS1_51, RPHPLS2_51, RPHPLS3_51, RPHMIN1_52, RPHPLS1_52, RPHPLS2_52, RPHPLS3_52, RPHMIN1_53, RPHPLS1_53, RPHPLS2_53, RPHPLS3_53, RPHMIN1_54, RPHPLS1_54, RPHPLS2_54, RPHPLS3_54, RPHMIN1_55, RPHPLS1_55, RPHPLS2_55, RPHPLS3_55, RPHMIN1_56, RPHPLS1_56, RPHPLS2_56, RPHPLS3_56, RPHMIN1_57, RPHPLS1_57, RPHPLS2_57, RPHPLS3_57, RPHMIN1_58, RPHPLS1_58, RPHPLS2_58, RPHPLS3_58, VOLMIN1, VOLPLS1, VOLPLS2, KDLEVEL, VOLPLS3', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'ID' => 'ID',
			'THANG' => 'Thang',
			'KDJENDOK' => 'Kdjendok',
			'KDSATKER' => 'Kdsatker',
			'KDDEPT' => 'Kddept',
			'KDUNIT' => 'Kdunit',
			'KDPROGRAM' => 'Kdprogram',
			'KDGIAT' => 'Kdgiat',
			'KDOUTPUT' => 'Kdoutput',
			'KDLOKASI' => 'Kdlokasi',
			'KDKABKOTA' => 'Kdkabkota',
			'KDDEKON' => 'Kddekon',
			'KDSOUTPUT' => 'Kdsoutput',
			'KDKMPNEN' => 'Kdkmpnen',
			'KDSDANA' => 'Kdsdana',
			'RPHMIN1_51' => 'Rphmin1 51',
			'RPHPLS1_51' => 'Rphpls1 51',
			'RPHPLS2_51' => 'Rphpls2 51',
			'RPHPLS3_51' => 'Rphpls3 51',
			'RPHMIN1_52' => 'Rphmin1 52',
			'RPHPLS1_52' => 'Rphpls1 52',
			'RPHPLS2_52' => 'Rphpls2 52',
			'RPHPLS3_52' => 'Rphpls3 52',
			'RPHMIN1_53' => 'Rphmin1 53',
			'RPHPLS1_53' => 'Rphpls1 53',
			'RPHPLS2_53' => 'Rphpls2 53',
			'RPHPLS3_53' => 'Rphpls3 53',
			'RPHMIN1_54' => 'Rphmin1 54',
			'RPHPLS1_54' => 'Rphpls1 54',
			'RPHPLS2_54' => 'Rphpls2 54',
			'RPHPLS3_54' => 'Rphpls3 54',
			'RPHMIN1_55' => 'Rphmin1 55',
			'RPHPLS1_55' => 'Rphpls1 55',
			'RPHPLS2_55' => 'Rphpls2 55',
			'RPHPLS3_55' => 'Rphpls3 55',
			'RPHMIN1_56' => 'Rphmin1 56',
			'RPHPLS1_56' => 'Rphpls1 56',
			'RPHPLS2_56' => 'Rphpls2 56',
			'RPHPLS3_56' => 'Rphpls3 56',
			'RPHMIN1_57' => 'Rphmin1 57',
			'RPHPLS1_57' => 'Rphpls1 57',
			'RPHPLS2_57' => 'Rphpls2 57',
			'RPHPLS3_57' => 'Rphpls3 57',
			'RPHMIN1_58' => 'Rphmin1 58',
			'RPHPLS1_58' => 'Rphpls1 58',
			'RPHPLS2_58' => 'Rphpls2 58',
			'RPHPLS3_58' => 'Rphpls3 58',
			'VOLMIN1' => 'Volmin1',
			'VOLPLS1' => 'Volpls1',
			'VOLPLS2' => 'Volpls2',
			'KDLEVEL' => 'Kdlevel',
			'VOLPLS3' => 'Volpls3',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('ID',$this->ID);
		$criteria->compare('THANG',$this->THANG,true);
		$criteria->compare('KDJENDOK',$this->KDJENDOK,true);
		$criteria->compare('KDSATKER',$this->KDSATKER,true);
		$criteria->compare('KDDEPT',$this->KDDEPT,true);
		$criteria->compare('KDUNIT',$this->KDUNIT,true);
		$criteria->compare('KDPROGRAM',$this->KDPROGRAM,true);
		$criteria->compare('KDGIAT',$this->KDGIAT,true);
		$criteria->compare('KDOUTPUT',$this->KDOUTPUT,true);
		$criteria->compare('KDLOKASI',$this->KDLOKASI,true);
		$criteria->compare('KDKABKOTA',$this->KDKABKOTA,true);
		$criteria->compare('KDDEKON',$this->KDDEKON,true);
		$criteria->compare('KDSOUTPUT',$this->KDSOUTPUT,true);
		$criteria->compare('KDKMPNEN',$this->KDKMPNEN,true);
		$criteria->compare('KDSDANA',$this->KDSDANA,true);
		$criteria->compare('RPHMIN1_51',$this->RPHMIN1_51,true);
		$criteria->compare('RPHPLS1_51',$this->RPHPLS1_51,true);
		$criteria->compare('RPHPLS2_51',$this->RPHPLS2_51,true);
		$criteria->compare('RPHPLS3_51',$this->RPHPLS3_51,true);
		$criteria->compare('RPHMIN1_52',$this->RPHMIN1_52,true);
		$criteria->compare('RPHPLS1_52',$this->RPHPLS1_52,true);
		$criteria->compare('RPHPLS2_52',$this->RPHPLS2_52,true);
		$criteria->compare('RPHPLS3_52',$this->RPHPLS3_52,true);
		$criteria->compare('RPHMIN1_53',$this->RPHMIN1_53,true);
		$criteria->compare('RPHPLS1_53',$this->RPHPLS1_53,true);
		$criteria->compare('RPHPLS2_53',$this->RPHPLS2_53,true);
		$criteria->compare('RPHPLS3_53',$this->RPHPLS3_53,true);
		$criteria->compare('RPHMIN1_54',$this->RPHMIN1_54,true);
		$criteria->compare('RPHPLS1_54',$this->RPHPLS1_54,true);
		$criteria->compare('RPHPLS2_54',$this->RPHPLS2_54,true);
		$criteria->compare('RPHPLS3_54',$this->RPHPLS3_54,true);
		$criteria->compare('RPHMIN1_55',$this->RPHMIN1_55,true);
		$criteria->compare('RPHPLS1_55',$this->RPHPLS1_55,true);
		$criteria->compare('RPHPLS2_55',$this->RPHPLS2_55,true);
		$criteria->compare('RPHPLS3_55',$this->RPHPLS3_55,true);
		$criteria->compare('RPHMIN1_56',$this->RPHMIN1_56,true);
		$criteria->compare('RPHPLS1_56',$this->RPHPLS1_56,true);
		$criteria->compare('RPHPLS2_56',$this->RPHPLS2_56,true);
		$criteria->compare('RPHPLS3_56',$this->RPHPLS3_56,true);
		$criteria->compare('RPHMIN1_57',$this->RPHMIN1_57,true);
		$criteria->compare('RPHPLS1_57',$this->RPHPLS1_57,true);
		$criteria->compare('RPHPLS2_57',$this->RPHPLS2_57,true);
		$criteria->compare('RPHPLS3_57',$this->RPHPLS3_57,true);
		$criteria->compare('RPHMIN1_58',$this->RPHMIN1_58,true);
		$criteria->compare('RPHPLS1_58',$this->RPHPLS1_58,true);
		$criteria->compare('RPHPLS2_58',$this->RPHPLS2_58,true);
		$criteria->compare('RPHPLS3_58',$this->RPHPLS3_58,true);
		$criteria->compare('VOLMIN1',$this->VOLMIN1,true);
		$criteria->compare('VOLPLS1',$this->VOLPLS1,true);
		$criteria->compare('VOLPLS2',$this->VOLPLS2,true);
		$criteria->compare('KDLEVEL',$this->KDLEVEL,true);
		$criteria->compare('VOLPLS3',$this->VOLPLS3,true);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}